import { createRouter,createWebHashHistory,createWebHistory,createMemoryHistory } from "vue-router";


// 1.声明routes配置，一个routes是一个数组，routes对象里面的基本属性由path和compinents组成

let routes=[ 
    {   
        name:"login",
        path:"/login",
        component:()=>import("../pages/login/index.vue")
    },
    {
        name:'home',
        path:"/",
        component:()=>import("../pages/home/index.vue")
    }
]

// 2.创建路由
const router = createRouter({
    history:createWebHashHistory("/base"),
    routes,
})

export default router